Caching refers to the temporary storage of data to achieve higher performance in software systems. This performance gain can be achieved by reducing the number of accesses to the original record of data which may require intensive computing operations to create, or be otherwise expensive (in terms of resources) to access. Performance gains can also be achieved by sharing the cached data across threads in a process, processes, and potentially across processes spread over multiple machines.
A cached object is an object that is placed in the cache. Each cached object is referenced by a key, selected by the user when the user adds the object to the cache. Objects in the cache are generally either serializable or mutable. A mutable object is an object whose internal state can be mutated, or changed, by the user. This includes instances of user-defined classes that have been identified as mutable via configuration, as well as instances of standard mutable types such as collections, maps, and dates.